package com.tjsinfo.tjsoa.documentationflow.xingzhengshouwen.bo;

import java.util.List;

import org.hibernate.criterion.DetachedCriteria;

import com.tjsinfo.tjsoa.documentationflow.xingzhengshouwen.vo.ShouWenInfo;
import com.tjsinfo.tjsoa.documentationflow.xingzhengshouwen.vo.TXingzhengshouwenFujian;
import com.tjsinfo.tjsoa.documentationflow.xingzhengshouwen.vo.TXingzhengshouwenNeirong;
import com.tjsinfo.tjsoa.system.vo.Files;



public interface ITXingzhengshouwenNeirongBO {
	/**
	 * 添加行政收文内容
	 * @param 行政收文
	 * @return 行政手纹ID
	 */
	public String addTXingzhengshouweineirong(TXingzhengshouwenNeirong xingzhengshouwenNeirong,String qingbanren,List<Files> list,Integer userId);
	
	
	/**
	 * 添加行政收文内容 无流程登记用
	 * @param 行政收文
	 * @return 行政收文ID
	 */
	public String addTXingzhengshouweineirong(TXingzhengshouwenNeirong xingzhengshouwenNeirong,List<String> chengbanrenList,List<Files> list,Integer userId);

	
	/**
	 * 根据ID查询行政收文
	 * @param id
	 * @return
	 */
	public TXingzhengshouwenNeirong selectOneById(String id);
	/**
	 * 更新行政收文内容
	 * @param zuzhibufaweiNeirong
	 * @return
	 */
	public Boolean updateTXingzhengshouwenneirong(TXingzhengshouwenNeirong xingzhengshouwenNeirong);
	/**
	 * 示例查询行政收文
	 * @param zuzhibufaweiNeirong
	 * @return
	 */
	public List<TXingzhengshouwenNeirong> findByExample(TXingzhengshouwenNeirong xingzhengshouwenNeirong);
	/**
	 * 查询行政收文的总行数
	 * @return
	 */
	public Integer selectXingzhengshouwenTotalLine();
	
	/**
	 * 查询行政收文的总行数
	 * @return
	 */
	public Integer selectXingzhengshouwenTotalLine(String laiwenjihuan,String laiwenzihao ,String zhaiyao);
	
	/**
	 * 查询行政收文分页
	 * @return
	 */
	public List<TXingzhengshouwenNeirong> selectXingzhengshouwenPage(Integer first,Integer max);
	
	/**
	 * 查询行政收文分页
	 * @return
	 */
	public List<TXingzhengshouwenNeirong> selectXingzhengshouwenPage(Integer first,Integer max,String laiwenjihuan,String laiwenzihao ,String zhaiyao);
	
	/**
	 * 条件查询行政收文的总行数
	 * @return
	 */
	public Integer selectXingzhengshouwenTotalLineCriteria(DetachedCriteria criteria);
	
	/**
	 * 条件查询行政收文分页
	 * @return
	 */
	public List<TXingzhengshouwenNeirong> selectXingzhengshouwenPageCriteria(DetachedCriteria criteria, Integer first,Integer max);
	/**
	 * 根据年份查询总收文号
	 * @return
	 */
	public Integer selectMaxZongShouWenHaoByYear(String shouwentype);
	
	/**
	 * 删除
	 * @param xingzhengshouwenNeirong
	 * @return
	 */
	public Boolean deleteXingzhengshouwen(TXingzhengshouwenNeirong xingzhengshouwenNeirong);
	
	public List<TXingzhengshouwenNeirong> selectDownXingzhengshouwenNeirong(Integer userId,String proname);
	
	public TXingzhengshouwenNeirong selectDownXingzhengshouwenNeirongById(Integer dataBaseId,String id);
	
	public List<TXingzhengshouwenFujian>  selectDownXingzhengshouwenFuJian(Integer dataBaseId,String id);
	
	public Boolean endTask(Integer dataBaseId,Integer id);
	
	public List<ShouWenInfo> selectQingBanTask(Integer userId);
	
	public List<ShouWenInfo> selectChuanYueTask(Integer userId);
	
	public List<ShouWenInfo> selectDengJiXiuGaiTask(Integer userId);
	
	public List<ShouWenInfo> selectJiYaoBanLiTask(Integer userId);
	
	public List<ShouWenInfo> selectBuMenChengBanTask(Integer userId);
	
	public List<ShouWenInfo> selectShouWenBanLiZhongTask(Integer userId);
	
	public List<ShouWenInfo> selectShouWenFanKuiTask(Integer userId);
	
	public List<ShouWenInfo> selectDaibanTask(Integer userId, String huanjie);
	
	public List<ShouWenInfo> selectChaYueWenJian(Integer userId,Integer first,Integer max,String laiwenjiguan,String laiwenzihao,String zhaiyou,String tablename,String subtype);
	
	public Integer selectChaYueWenJianCount(Integer userId,Integer first,Integer max,String laiwenjiguan,String laiwenzihao,String zhaiyou,String tablename,String subtype);
	
	public List<ShouWenInfo> selectXingZhengShouWenGengZong(Integer first,Integer max,String laiwenjiguan,String laiwenzihao,String zhaiyou);
	
	public Integer selectXingZhengShouWenGengZongCount(Integer first,Integer max,String laiwenjiguan,String laiwenzihao,String zhaiyou);
	
	public List<ShouWenInfo> selectDangWeiShouWenGengZong(Integer first,Integer max,String laiwenjiguan,String laiwenzihao,String zhaiyou);
	
	public Integer selectDangWeiShouWenGengZongCount(Integer first,Integer max,String laiwenjiguan,String laiwenzihao,String zhaiyou);
	
	
	public List<String> selectAllUserId();
	
	public Integer isChuanYueCount(Integer userId, Integer flowId);
	
	public List<ShouWenInfo> selectDaibanTask(Integer userId);
	
//	public List<TXingzhengshouwenNeirong> selectXingZhengShouWenDaiBan(Integer userId);
	
	/**
	 * 查询流程上一个环节
	 * @param flowid
	 * @return
	 */
	public String selectTopTask(Integer flowid);
	
	public Boolean deleteTask(Integer taskId);
}
